home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
d
/
databasev3.1reg.lha
/
db3.1
/
Examples
/
Relations
/
CD-Songs.db
< prev
next >
Wrap
Text File
|
1995-09-27
|
920b
|
41 lines
/* Relational look-up
* ARrexx script for db showing how simple relations can be implemented.
* By David Ekholm 1995
* $VER: look-up.db 1.0 (13.9.95)
*
* To create your own relations, just modify the two lines below
*/
file = 'Songs'
key = 'CD #'
/* 'file' indicates what file to do the look-up in. 'key' is the field to
* look into. This scripts expects the portname to be 'file'.1
* It also assumes the key fieldname to be the same in the two databases.
*/
port = file || '.1'
Options Results
GetField key
keyval = result
if find(show('p'), port) == 0 then do
address command 'run //db ' file
address COMMAND WaitForPort port
ActivateWindow /* Reactivate the old window */
end
address VALUE port
BlockInput /* Do this silently */
Mode 'find'
Kill
CurrentField key
PutField keyval
FindFirst
if RC == 5 then do
DisplayBeep
Okay1 key keyval 'can''t be found in the ' file 'database!'
end
FreeInput